home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / LPC / alists next >
Text File  |  2001-04-06  |  2KB  |  51 lines

  1. CONCEPT
  2.         alists
  3.  
  4. LAST UPDATE
  5.         2 Mar 92 21:10:21 GMT
  6.  
  7. AUTHOR
  8.         From: amylaar@mcshh.hanse.de (Joern Rennecke)
  9.         Subject: general documentation on alists
  10.  
  11. DESCRIPTION
  12.         Alists provide a fast and convenient way to access data
  13.         associatively.
  14.  
  15.         Alists are implemented as arrays of arrays, the first being
  16.         the array holding the keys, the others arrays holding
  17.         associated data. An empty alist is an array of empty arrays.
  18.  
  19.         Note that the the dimensions of the arrays are used the other
  20.         way than in lisp to allow for faster searching.
  21.  
  22.         Keys have to be of type integer, string or object. Types can
  23.         be mixed.
  24.  
  25.         The search functions return an undefined value when another
  26.         list is given in place of a presorted key list.
  27.  
  28.         A list with non-numeric keys retrieved by restore_object() has
  29.         to be readjusted by using order_alist(), especially after
  30.         reboot.
  31.  
  32.         Deleting an entry can safely be done with exclude_array as
  33.         long as all associated data lists are treated like the key
  34.         array; index finding for such purposes can be done with assoc.
  35.  
  36.         Typical applications: holding administrary information about
  37.         wizards, list of visitors in a pub, list of customers having
  38.         some sort of credit, information remembered about items etc.
  39.  
  40. NOTE
  41.         The main use of alists, storing data associatively, is now
  42.         better performed by mappings. Alists are needed for more
  43.         extreme situations only.
  44.  
  45. CAVEATS
  46.          A maximum array size of 1000 might prove to be to small.
  47.  
  48. SEE ALSO
  49.         mappings(LPC), order_alist(E), insert_alist(E), assoc(E),
  50.         transpose_array(E)
  51.